﻿using System;
using System.Net;
using System.Xml.Linq;

namespace ArmoryBrowser.Entities
{
    public class TabInfo
    {
        #region Fields
        private string _subTabField;
        private string _tabField;
        private string _tabGroupField;
        private string _tabUrlField;
        #endregion
        #region Properties
        public string SubTab
        {
            get
            {
                return this._subTabField;
            }
            set
            {
                this._subTabField = value;
            }
        }

        public string Tab
        {
            get
            {
                return this._tabField;
            }
            set
            {
                this._tabField = value;
            }
        }

        public string TabGroup
        {
            get
            {
                return this._tabGroupField;
            }
            set
            {
                this._tabGroupField = value;
            }
        }

        public string TabUrl
        {
            get
            {
                return this._tabUrlField;
            }
            set
            {
                this._tabUrlField = value;
            }
        }
        #endregion
        #region Constructor
        public TabInfo(XElement elem)
        {
            SubTab = elem.GetAttributeValue("subTab");
            Tab = elem.GetAttributeValue("tab");
            TabGroup = elem.GetAttributeValue("tabGroup");
            TabUrl = elem.GetAttributeValue("tabUrl");
        }
        #endregion
    }
}
